package com.linkoog.devtools.type.impl;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.linkoog.devtools.type.Type;
import com.linkoog.devtools.type.TypeBase;
import lombok.Getter;

public class ArrayType extends TypeBase {

    @Getter
    private final Type dataType;

    public ArrayType(Type dataType) {
        super("Array<" + dataType.getTypeName() + ">", "Array<" + dataType.getTypeFullName() + ">");
        this.dataType = dataType;
    }

    @JsonCreator
    public ArrayType(@JsonProperty("typeName")String typeName, @JsonProperty("typeFullName")String typeFullName, @JsonProperty("dataType") Type dataType) {
        super(typeName, typeFullName);
        this.dataType = dataType;
    }

}
